package com.org.model;

/**
 * PaymentShippingMethodId entity. @author MyEclipse Persistence Tools
 */

public class PaymentShippingMethodId implements java.io.Serializable {

	// Fields

	private PaymentMethod paymentMethod;
	private ShippingMethod shippingMethod;

	// Constructors

	/** default constructor */
	public PaymentShippingMethodId() {
	}

	/** full constructor */
	public PaymentShippingMethodId(PaymentMethod paymentMethod,
			ShippingMethod shippingMethod) {
		this.paymentMethod = paymentMethod;
		this.shippingMethod = shippingMethod;
	}

	// Property accessors

	public PaymentMethod getPaymentMethod() {
		return this.paymentMethod;
	}

	public void setPaymentMethod(PaymentMethod paymentMethod) {
		this.paymentMethod = paymentMethod;
	}

	public ShippingMethod getShippingMethod() {
		return this.shippingMethod;
	}

	public void setShippingMethod(ShippingMethod shippingMethod) {
		this.shippingMethod = shippingMethod;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof PaymentShippingMethodId))
			return false;
		PaymentShippingMethodId castOther = (PaymentShippingMethodId) other;

		return ((this.getPaymentMethod() == castOther.getPaymentMethod()) || (this
				.getPaymentMethod() != null
				&& castOther.getPaymentMethod() != null && this
				.getPaymentMethod().equals(castOther.getPaymentMethod())))
				&& ((this.getShippingMethod() == castOther.getShippingMethod()) || (this
						.getShippingMethod() != null
						&& castOther.getShippingMethod() != null && this
						.getShippingMethod().equals(
								castOther.getShippingMethod())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPaymentMethod() == null ? 0 : this.getPaymentMethod()
						.hashCode());
		result = 37
				* result
				+ (getShippingMethod() == null ? 0 : this.getShippingMethod()
						.hashCode());
		return result;
	}

}